/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80014
 Source Host           : localhost:3306
 Source Schema         : lu_cloud_stack_nacos_config

 Target Server Type    : MySQL
 Target Server Version : 80014
 File Encoding         : 65001

 Date: 07/08/2023 23:16:31
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for config_info
-- ----------------------------
DROP TABLE IF EXISTS `config_info`;
CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COLLATE utf8_bin COMMENT 'source user',
  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL,
  `c_use` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `effect` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `type` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `c_schema` text COLLATE utf8_bin,
  `encrypted_data_key` text COLLATE utf8_bin NOT NULL COMMENT '秘钥',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';

-- ----------------------------
-- Records of config_info
-- ----------------------------
BEGIN;
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (1, 'lu-stack-nacos.yml', 'business', ' application-message: nacos-dev2', '549582af43e83f5bce3e8feff36346cd', '2023-01-30 09:54:13', '2023-02-01 15:42:25', 'lu-cloud-stack-admin', '127.0.0.1', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (12, 'lu-stack-nacos-ext.yml', 'business', ' application-message: nacos-ext', '856c79df68bbd05684bc71126fa0d9d7', '2023-01-30 12:10:03', '2023-01-30 12:10:13', 'nacos', '127.0.0.1', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (29, 'lu-cloud-stack.yml', 'framework', 'feign:\n  client:\n    config:\n      default: #default默认所有服务的超时时间\n        connect-timeout: 9000\n        read-timeout: 9000\n      lu-stack-nacos:\n        connect-timeout: 9000\n        read-timeout: 9000\n    refresh-enabled: true\n  sentinel: #激活Sentinel对Feign的支持\n    enabled: true\n  hystrix:\n    enabled: true\n\nhystrix:\n  command:\n    default:\n      execution:\n        timeout:\n          enabled: true\n        isolation:\n          thread:\n            timeoutInMilliseconds: 60000\n\nmybatis-plus:\n  mapper-locations: classpath*:/mapper/**/*.xml\n  configuration:\n    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\nspring:\n  datasource:\n    druid:\n      initial-size: 10\n      min-idle: 10\n      max-active: 20\n      # 配置获取连接等待超时的时间\n      max-wait: 60000\n      # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒\n      time-between-eviction-runs-millis: 60000\n      # 配置一个连接在池中最小生存的时间，单位是毫秒\n      min-evictable-idle-time-millis: 30000\n      validation-query: select 1\n      test-while-idle: true\n      test-on-borrow: false\n      test-on-return: false\n      # 配置监控统计拦截的filters，去掉后监控界面sql无法统计，\'wall\'用于防火墙\n      filters: stat,wall,slf4j,config\n      # 合并多个DruidDataSource的监控数据\n      use-global-data-source-stat: true\n      # 通过connectProperties属性来打开mergeSql功能；慢SQL记录\n      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;\n      filter:\n        stat:\n          log-slow-sql: true\n      stat-view-servlet:\n        enabled: true\n        login-username: admin\n        login-password: 111111\n        url-pattern: /druid/*\n        allow: \'\'\n        deny: \'\'\n\n# 启用服务健康检测，注册中心将通过http://host:port/actuator/health 检测服务的存活，默认10s一次\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include:\n          # 开放所有端点health，info，metrics，通过actuator/+端点名就可以获取相应的信息。开发用*，上生产请取消。默认打开health和info\n         - \"*\"', '28eb7e85c92379d644b00f67e1c3fbdb', '2023-02-02 08:42:41', '2023-02-14 08:03:31', 'lu-cloud-stack-admin', '127.0.0.1', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (30, 'lu-integrate-gateway.yml', 'integrate', 'spring:\n  # redis 配置\n  redis:\n    host: 127.0.0.1\n    port: 6379\n    database: 0\n    password: \n    #连接超时时间\n    timeout: 1000ms\n  cloud:\n    gateway:\n      enabled: true\n      discovery:\n        locator:\n          enabled: true\n          lower-case-service-id: false\n      httpclient:\n        connect-timeout: 2000\n        response-timeout: 20s\n      globalcors:\n        cors-configurations:\n          \'[/**]\':\n            allowedOrigins: \"*\"\n            allowedMethods:\n              - GET\n              - POST\n      #开启指标统计\n      metrics:\n        enabled: true\n      routes:\n        - id: lu-stack-nacos\n          uri: lb://lu-stack-nacos\n          predicates:\n            - name: Path\n              args:\n                pattern: /nacos/**\n          filters:\n            - name: StripPrefix\n              args:\n                parts: 1\n        - id: lu-stack-api\n          uri: lb://lu-stack-api\n          predicates:\n            - name: Path\n              args:\n                pattern: /api/**\n          metadata:\n            optionName: \"OptionValue\"\n            compositeObject:\n              name: \"value\"\n            iAmNumber: 1\n          filters:\n            - name: CustomRequestRateLimiter\n              args:\n                #期望每秒执行多少请求，令牌桶被填充的速率\n                redis-rate-limiter.replenishRate: 1\n                #允许用户在一秒钟内执行的最大请求数，令牌桶可以容纳的令牌数\n                redis-rate-limiter.burstCapacity: 1\n                #请求花费的令牌数量，默认为1\n                redis-rate-limiter.requestedTokens: 1\n                #限流key规则\n                key-resolver: \"#{@ipKeyResolver}\"\n            - name: Api\n              args:\n                name: 自定义过滤器\n                prefixUrl: /api\n            - name: StripPrefix\n              args:\n                parts: 1\n\n\n# 启用服务健康检测，注册中心将通过http://host:port/actuator/health 检测服务的存活，默认10s一次\n# 查看网关的路由：http://localhost:8888/actuator/gateway/routes\n# 查看网关的请求：http://localhost:8088/actuator/metrics/gateway.requests\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include:\n          # 开放所有端点health，info，metrics，通过actuator/+端点名就可以获取相应的信息。开发用*，上生产请取消。默认打开health和info\n          - \"*\"\n            # - \"health\"\n          # - \"info\"\n          # - \"metrics\"', '96f26b931de629776f76ac8e77d952d6', '2023-02-02 09:35:20', '2023-08-07 13:46:00', 'lu-cloud-stack-admin', '127.0.0.1', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (54, 'lu-integrate-message-center.yml', 'integrate', 'message:\n  queue:\n    db: \n      #是否启用，开启周期执行任务\n      enable: true\n      #是否暂停     \n      stop: false\n      #处理批次大小\n      batch-size: 20\n      #执行等待时间s\n      execute-wait-time: 10\n      #暂停等待时间s\n      stop-wait-time: 60', '323913fa9566ce785882df6825a49c20', '2023-02-14 05:21:39', '2023-02-14 06:08:52', 'lu-cloud-stack-admin', '172.16.82.79', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (64, 'equity-market-api.yml', 'dev', ' application-message: nacos-dev1', '7b93bb1dd60e1156177b8464f8aaed49', '2023-02-17 10:06:12', '2023-02-17 16:45:08', 'nacos', '127.0.0.1', 'lu-cloud-stack', 'equity-market', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (65, 'equity-market-api-ext.yml', 'dev', ' application-message: nacos-ext', '856c79df68bbd05684bc71126fa0d9d7', '2023-02-17 10:06:12', '2023-02-17 10:06:12', NULL, '127.0.0.1', 'lu-cloud-stack', 'equity-market', '', NULL, NULL, 'yaml', NULL, '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (66, 'equity-market.yml', 'dev', 'feign:\n  client:\n    config:\n      default: #default默认所有服务的超时时间\n        connect-timeout: 9000\n        read-timeout: 9000\n      lu-stack-nacos:\n        connect-timeout: 9000\n        read-timeout: 9000\n    refresh-enabled: true\n  sentinel: #激活Sentinel对Feign的支持\n    enabled: true\n  hystrix:\n    enabled: true\n\nhystrix:\n  command:\n    default:\n      execution:\n        timeout:\n          enabled: true\n        isolation:\n          thread:\n            timeoutInMilliseconds: 60000\n\nmybatis-plus:\n  mapper-locations: classpath*:/mapper/**/*.xml\n  configuration:\n    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\nspring:\n  datasource:\n    druid:\n      initial-size: 10\n      min-idle: 10\n      max-active: 20\n      # 配置获取连接等待超时的时间\n      max-wait: 60000\n      # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒\n      time-between-eviction-runs-millis: 60000\n      # 配置一个连接在池中最小生存的时间，单位是毫秒\n      min-evictable-idle-time-millis: 30000\n      validation-query: select 1\n      test-while-idle: true\n      test-on-borrow: false\n      test-on-return: false\n      # 配置监控统计拦截的filters，去掉后监控界面sql无法统计，\'wall\'用于防火墙\n      filters: stat,wall,slf4j,config\n      # 合并多个DruidDataSource的监控数据\n      use-global-data-source-stat: true\n      # 通过connectProperties属性来打开mergeSql功能；慢SQL记录\n      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;\n      filter:\n        stat:\n          log-slow-sql: true\n      stat-view-servlet:\n        enabled: true\n        login-username: admin\n        login-password: 111111\n        url-pattern: /druid/*\n        allow: \'\'\n        deny: \'\'\n  # redis 配置\n  redis:\n    host: 192.168.9.83\n    port: 6379\n    database: 0\n    password: Redis123!\n\n# 启用服务健康检测，注册中心将通过http://host:port/actuator/health 检测服务的存活，默认10s一次\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include:\n          # 开放所有端点health，info，metrics，通过actuator/+端点名就可以获取相应的信息。开发用*，上生产请取消。默认打开health和info\n         - \"*\"', '9645b7384d49614e8acb33cb155c5677', '2023-02-17 10:06:12', '2023-02-17 15:40:22', 'nacos', '127.0.0.1', 'lu-cloud-stack', 'equity-market', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (70, 'lu-stack-nacos.yml', 'business', ' application-message: nacos-dev2', '549582af43e83f5bce3e8feff36346cd', '2023-03-03 06:25:07', '2023-03-03 06:25:07', NULL, '127.0.0.1', 'lu-cloud-stack', '', '', NULL, NULL, 'yaml', NULL, '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (72, 'lu-cloud-stack-component.yml', 'component', 'rpc:\n  boot:\n    client:\n      protocol: HTTP\n      timeout: 9000\n      logLevel: DEBUG', '87898e72e9a66c508fb4c428339546c6', '2023-08-07 14:18:11', '2023-08-07 14:19:10', 'lu-cloud-stack-admin', '127.0.0.1', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`, `encrypted_data_key`) VALUES (75, 'lu-cloud-stack-integrate.yml', 'integrate', 'k: ', 'f4f8694035afc2e6c93beb6372b93a7c', '2023-08-07 14:21:26', '2023-08-07 14:22:25', 'lu-cloud-stack-admin', '127.0.0.1', 'lu-cloud-stack', 'lu-cloud-stack', '', '', '', 'yaml', '', '');
COMMIT;

-- ----------------------------
-- Table structure for config_info_aggr
-- ----------------------------
DROP TABLE IF EXISTS `config_info_aggr`;
CREATE TABLE `config_info_aggr` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'datum_id',
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';

-- ----------------------------
-- Records of config_info_aggr
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_info_beta
-- ----------------------------
DROP TABLE IF EXISTS `config_info_beta`;
CREATE TABLE `config_info_beta` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COLLATE utf8_bin COMMENT 'source user',
  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` text COLLATE utf8_bin NOT NULL COMMENT '秘钥',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';

-- ----------------------------
-- Records of config_info_beta
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_info_tag
-- ----------------------------
DROP TABLE IF EXISTS `config_info_tag`;
CREATE TABLE `config_info_tag` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COLLATE utf8_bin COMMENT 'source user',
  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';

-- ----------------------------
-- Records of config_info_tag
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_tags_relation
-- ----------------------------
DROP TABLE IF EXISTS `config_tags_relation`;
CREATE TABLE `config_tags_relation` (
  `id` bigint(20) NOT NULL COMMENT 'id',
  `tag_name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint(20) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`),
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';

-- ----------------------------
-- Records of config_tags_relation
-- ----------------------------
BEGIN;
INSERT INTO `config_tags_relation` (`id`, `tag_name`, `tag_type`, `data_id`, `group_id`, `tenant_id`, `nid`) VALUES (1, 'lu-cloud-stack', '', 'lu-stack-nacos', 'DEV', 'lu-cloud-stack', 3);
COMMIT;

-- ----------------------------
-- Table structure for group_capacity
-- ----------------------------
DROP TABLE IF EXISTS `group_capacity`;
CREATE TABLE `group_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID，空字符表示整个集群',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数，，0表示使用默认值',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';

-- ----------------------------
-- Records of group_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for his_config_info
-- ----------------------------
DROP TABLE IF EXISTS `his_config_info`;
CREATE TABLE `his_config_info` (
  `id` bigint(20) unsigned NOT NULL,
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL,
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL,
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL,
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text COLLATE utf8_bin,
  `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `op_type` char(10) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  `encrypted_data_key` text COLLATE utf8_bin NOT NULL COMMENT '秘钥',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`),
  KEY `idx_gmt_modified` (`gmt_modified`),
  KEY `idx_did` (`data_id`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';

-- ----------------------------
-- Records of his_config_info
-- ----------------------------
BEGIN;
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`, `encrypted_data_key`) VALUES (30, 74, 'lu-integrate-gateway.yml', 'dev', 'lu-cloud-stack', 'spring:\n  # redis 配置\n  redis:\n    host: 192.168.9.83\n    port: 6379\n    database: 0\n    password: Redis123!\n    #连接超时时间\n    timeout: 1000ms\n  cloud:\n    gateway:\n      enabled: true\n      discovery:\n        locator:\n          enabled: true\n          lower-case-service-id: false\n      httpclient:\n        connect-timeout: 2000\n        response-timeout: 20s\n      globalcors:\n        cors-configurations:\n          \'[/**]\':\n            allowedOrigins: \"*\"\n            allowedMethods:\n              - GET\n              - POST\n      #开启指标统计\n      metrics:\n        enabled: true\n      routes:\n        - id: lu-stack-nacos\n          uri: lb://lu-stack-nacos\n          predicates:\n            - name: Path\n              args:\n                pattern: /nacos/**\n          filters:\n            - name: StripPrefix\n              args:\n                parts: 1\n        - id: lu-stack-api\n          uri: lb://lu-stack-api\n          predicates:\n            - name: Path\n              args:\n                pattern: /api/**\n          metadata:\n            optionName: \"OptionValue\"\n            compositeObject:\n              name: \"value\"\n            iAmNumber: 1\n          filters:\n            - name: CustomRequestRateLimiter\n              args:\n                #期望每秒执行多少请求，令牌桶被填充的速率\n                redis-rate-limiter.replenishRate: 1\n                #允许用户在一秒钟内执行的最大请求数，令牌桶可以容纳的令牌数\n                redis-rate-limiter.burstCapacity: 1\n                #请求花费的令牌数量，默认为1\n                redis-rate-limiter.requestedTokens: 1\n                #限流key规则\n                key-resolver: \"#{@ipKeyResolver}\"\n            - name: Api\n              args:\n                name: 自定义过滤器\n                prefixUrl: /api\n            - name: StripPrefix\n              args:\n                parts: 1\n\n\n# 启用服务健康检测，注册中心将通过http://host:port/actuator/health 检测服务的存活，默认10s一次\n# 查看网关的路由：http://localhost:8888/actuator/gateway/routes\n# 查看网关的请求：http://localhost:8088/actuator/metrics/gateway.requests\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include:\n          # 开放所有端点health，info，metrics，通过actuator/+端点名就可以获取相应的信息。开发用*，上生产请取消。默认打开health和info\n          - \"*\"\n            # - \"health\"\n          # - \"info\"\n          # - \"metrics\"', 'ee27cf17230390fe97a42d2f8e5945e6', '2023-08-07 21:45:59', '2023-08-07 13:46:00', 'lu-cloud-stack-admin', '127.0.0.1', 'U', 'lu-cloud-stack', '');
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`, `encrypted_data_key`) VALUES (0, 75, 'lu-component.yml', 'dev', 'lu-cloud-stack', 'feign:\n  client:\n    config:\n      default: #default默认所有服务的超时时间\n        connect-timeout: 9000\n        read-timeout: 9000\n      lu-stack-nacos:\n        connect-timeout: 9000\n        read-timeout: 9000\n    refresh-enabled: true\n  sentinel: #激活Sentinel对Feign的支持\n    enabled: true\n  hystrix:\n    enabled: true\n\nhystrix:\n  command:\n    default:\n      execution:\n        timeout:\n          enabled: true\n        isolation:\n          thread:\n            timeoutInMilliseconds: 60000\n\nmybatis-plus:\n  mapper-locations: classpath*:/mapper/**/*.xml\n  configuration:\n    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\nspring:\n  datasource:\n    druid:\n      initial-size: 10\n      min-idle: 10\n      max-active: 20\n      # 配置获取连接等待超时的时间\n      max-wait: 60000\n      # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒\n      time-between-eviction-runs-millis: 60000\n      # 配置一个连接在池中最小生存的时间，单位是毫秒\n      min-evictable-idle-time-millis: 30000\n      validation-query: select 1\n      test-while-idle: true\n      test-on-borrow: false\n      test-on-return: false\n      # 配置监控统计拦截的filters，去掉后监控界面sql无法统计，\'wall\'用于防火墙\n      filters: stat,wall,slf4j,config\n      # 合并多个DruidDataSource的监控数据\n      use-global-data-source-stat: true\n      # 通过connectProperties属性来打开mergeSql功能；慢SQL记录\n      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;\n      filter:\n        stat:\n          log-slow-sql: true\n      stat-view-servlet:\n        enabled: true\n        login-username: admin\n        login-password: 111111\n        url-pattern: /druid/*\n        allow: \'\'\n        deny: \'\'\n\n# 启用服务健康检测，注册中心将通过http://host:port/actuator/health 检测服务的存活，默认10s一次\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include:\n          # 开放所有端点health，info，metrics，通过actuator/+端点名就可以获取相应的信息。开发用*，上生产请取消。默认打开health和info\n         - \"*\"', '28eb7e85c92379d644b00f67e1c3fbdb', '2023-08-07 22:18:11', '2023-08-07 14:18:11', NULL, '127.0.0.1', 'I', 'lu-cloud-stack', '');
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`, `encrypted_data_key`) VALUES (72, 76, 'lu-component.yml', 'dev', 'lu-cloud-stack', 'feign:\n  client:\n    config:\n      default: #default默认所有服务的超时时间\n        connect-timeout: 9000\n        read-timeout: 9000\n      lu-stack-nacos:\n        connect-timeout: 9000\n        read-timeout: 9000\n    refresh-enabled: true\n  sentinel: #激活Sentinel对Feign的支持\n    enabled: true\n  hystrix:\n    enabled: true\n\nhystrix:\n  command:\n    default:\n      execution:\n        timeout:\n          enabled: true\n        isolation:\n          thread:\n            timeoutInMilliseconds: 60000\n\nmybatis-plus:\n  mapper-locations: classpath*:/mapper/**/*.xml\n  configuration:\n    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\nspring:\n  datasource:\n    druid:\n      initial-size: 10\n      min-idle: 10\n      max-active: 20\n      # 配置获取连接等待超时的时间\n      max-wait: 60000\n      # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒\n      time-between-eviction-runs-millis: 60000\n      # 配置一个连接在池中最小生存的时间，单位是毫秒\n      min-evictable-idle-time-millis: 30000\n      validation-query: select 1\n      test-while-idle: true\n      test-on-borrow: false\n      test-on-return: false\n      # 配置监控统计拦截的filters，去掉后监控界面sql无法统计，\'wall\'用于防火墙\n      filters: stat,wall,slf4j,config\n      # 合并多个DruidDataSource的监控数据\n      use-global-data-source-stat: true\n      # 通过connectProperties属性来打开mergeSql功能；慢SQL记录\n      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;\n      filter:\n        stat:\n          log-slow-sql: true\n      stat-view-servlet:\n        enabled: true\n        login-username: admin\n        login-password: 111111\n        url-pattern: /druid/*\n        allow: \'\'\n        deny: \'\'\n\n# 启用服务健康检测，注册中心将通过http://host:port/actuator/health 检测服务的存活，默认10s一次\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include:\n          # 开放所有端点health，info，metrics，通过actuator/+端点名就可以获取相应的信息。开发用*，上生产请取消。默认打开health和info\n         - \"*\"', '28eb7e85c92379d644b00f67e1c3fbdb', '2023-08-07 22:18:58', '2023-08-07 14:18:59', 'lu-cloud-stack-admin', '127.0.0.1', 'U', 'lu-cloud-stack', '');
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`, `encrypted_data_key`) VALUES (72, 77, 'lu-component.yml', 'dev', 'lu-cloud-stack', 'component:\n  rpc:\n    boot:\n      client:\n        protocol: HTTP\n        timeout: 9000\n        logLevel: DEBUG', 'f225bd5df24c1d699dfa4a37d0ce3551', '2023-08-07 22:19:09', '2023-08-07 14:19:10', 'lu-cloud-stack-admin', '127.0.0.1', 'U', 'lu-cloud-stack', '');
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`, `encrypted_data_key`) VALUES (0, 78, 'lu-cloud-stack-integrate.yml', 'dev', 'lu-cloud-stack', 'rpc:\n  boot:\n    client:\n      protocol: HTTP\n      timeout: 9000\n      logLevel: DEBUG', '87898e72e9a66c508fb4c428339546c6', '2023-08-07 22:21:25', '2023-08-07 14:21:26', NULL, '127.0.0.1', 'I', 'lu-cloud-stack', '');
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`, `encrypted_data_key`) VALUES (75, 79, 'lu-cloud-stack-integrate.yml', 'dev', 'lu-cloud-stack', 'rpc:\n  boot:\n    client:\n      protocol: HTTP\n      timeout: 9000\n      logLevel: DEBUG', '87898e72e9a66c508fb4c428339546c6', '2023-08-07 22:22:25', '2023-08-07 14:22:25', 'lu-cloud-stack-admin', '127.0.0.1', 'U', 'lu-cloud-stack', '');
COMMIT;

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE `permissions` (
  `role` varchar(50) NOT NULL,
  `resource` varchar(255) NOT NULL,
  `action` varchar(8) NOT NULL,
  UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of permissions
-- ----------------------------
BEGIN;
INSERT INTO `permissions` (`role`, `resource`, `action`) VALUES ('equity-market-admin', 'equity-market:*:*', 'rw');
INSERT INTO `permissions` (`role`, `resource`, `action`) VALUES ('lu-cloud-stack-admin', 'lu-cloud-stack:*:*', 'rw');
COMMIT;

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
  `username` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL,
  UNIQUE KEY `idx_user_role` (`username`,`role`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
INSERT INTO `roles` (`username`, `role`) VALUES ('equity-market-admin', 'equity-market-admin');
INSERT INTO `roles` (`username`, `role`) VALUES ('lu-cloud-stack-admin', 'lu-cloud-stack-admin');
INSERT INTO `roles` (`username`, `role`) VALUES ('nacos', 'ROLE_ADMIN');
COMMIT;

-- ----------------------------
-- Table structure for tenant_capacity
-- ----------------------------
DROP TABLE IF EXISTS `tenant_capacity`;
CREATE TABLE `tenant_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';

-- ----------------------------
-- Records of tenant_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for tenant_info
-- ----------------------------
DROP TABLE IF EXISTS `tenant_info`;
CREATE TABLE `tenant_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';

-- ----------------------------
-- Records of tenant_info
-- ----------------------------
BEGIN;
INSERT INTO `tenant_info` (`id`, `kp`, `tenant_id`, `tenant_name`, `tenant_desc`, `create_source`, `gmt_create`, `gmt_modified`) VALUES (1, '1', 'lu-cloud-stack', 'lu-cloud-stack', 'lu springcloud-alibaba 技术栈', 'nacos', 1675072365248, 1675072365248);
INSERT INTO `tenant_info` (`id`, `kp`, `tenant_id`, `tenant_name`, `tenant_desc`, `create_source`, `gmt_create`, `gmt_modified`) VALUES (2, '1', 'equity-market', 'equity-market', '权益商城', 'nacos', 1676628296778, 1676628296778);
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `username` varchar(50) NOT NULL,
  `password` varchar(500) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` (`username`, `password`, `enabled`) VALUES ('equity-market-admin', '$2a$10$LsOnSY4KV5KsP95r0reNYeTLFSCnplQqPsDsqZ6lQdDO14kP5ABoK', 1);
INSERT INTO `users` (`username`, `password`, `enabled`) VALUES ('lu-cloud-stack-admin', '$2a$10$9qI0HbM2poOAdGyPlJbOze.Cw7tbzRneM94aommHAYhIjmXRZyD5C', 1);
INSERT INTO `users` (`username`, `password`, `enabled`) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
